package com.yeyks.common.utils.apputil.enums;

/**
 * 酒店类型
 * @author Administrator
 */
public enum HotelTypeEnum {
    /**
     * 酒店类型集合
     */
    GROUP("1","集团"),
    CHAIN("2","连锁"),
    MONOMER("3","单体")
    ;

    /**
     * code
     */
    private String code;

    /**
     * msg
     */
    private String msg;

    HotelTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * 根据 code值获取msg
     * @param code code值
     * @return
     */
    public static String getMsgByCode(String code){
        for(HotelTypeEnum bedTypeEnum: HotelTypeEnum.values()){
            if(code.equals(bedTypeEnum.getCode())){
                return bedTypeEnum.getMsg();
            }
        }
        return  null;
    }
}
